<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<%@include file="/WEB-INF/views/common/bstrapComm.jsp"%>
<title>审核</title>
</head>
<body  ng-app="myapp" ng-controller="queryEmployees" name="queryEmployees" ng-init="research()">
	<jsp:include page="/WEB-INF/views/home/navbar.jsp"></jsp:include>
	<div class="container"  novalidate>
 			<div class="row">
 				<div class="alert alert-danger" role="alert" ng-show="msg">{{msg}}</div>
 			</div>
 			<div class="row" >
				<div class="col-md-2">
					<input type="text" class="form-control" ng-model="true_name" placeholder="用户名" />
				</div>
				<div class="col-md-2">
					<input type="text" class="form-control" ng-model="mobile"  placeholder="手机号"  />
				</div>
				<div class="col-md-2">
					<input type="text" class="form-control" ng-model="id_card"  placeholder="身份证"  />
				</div>
				<div class="col-md-3">
					<div class="input-group date form_date" data-date-format="yyyy-mm-dd" data-link-format="yyyy-mm-dd">
							<input class="form-control" ng-model="create_time" size="16" type="text" placeholder="申请日期" readonly> 
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-remove"></span>
							</span>
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
					</div>
				</div>
				<div class="col-md-2">			
					<input class="btn btn-default" type="button" value="查询" ng-click="research()" ng-disabled="queryEmployees.$invalid" novalidate>
				</div>
			</div>
 		<table class="table">
			<thead>
				<tr>
					<th>工号</th>
					<th>姓名</th>
					<th>手机号</th>
					<th>身份证号</th>
					<th>申请时间</th>
					<th>职位</th>
					<th>签约状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="employee in page.result">
					<td>{{employee.user_id}}</td>
					<td>{{employee.true_name}}</td>
					<td>{{employee.mobile}}</td>
					<td>{{employee.id_card}}</td>
					<td>{{employee.create_time}}</td>
					<td>物流员</td>
					<td ng-show="employee.contract_status==0">未签约</td>
					<td ng-show="employee.contract_status==1">已签约</td>
					<td ng-show="employee.contract_status==2">已解约</td>
 					<td>
						<a href="#" ng-click="modify(employee)" ng-show="employee.contract_status==0"><span class='glyphicon glyphicon-cog'>签约</span></a>
						<a href="#" ng-click="modify(employee)" ng-show="employee.contract_status==1"><span class='glyphicon glyphicon-cog'>解约</span></a>
						<a href="#" ng-click="modify(employee)" ng-show="employee.contract_status==2"><span class='glyphicon glyphicon-cog'>重置</span></a>
						<a href="#" ng-click="view(employee)"><span class='glyphicon glyphicon-eye-open'>查看</span></a>
					</td>
				</tr>
			</tbody>
		</table>
		<uib-pagination  ng-change="pageChanged(page)" boundary-links="true" total-items="page.totalItems" ng-model="page.pageNo" items-per-page="page.pageSize"  class="pagination-sm pull-right" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
	</div>
	<!-- 模态框（Modal） -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel2" aria-hidden="true">
 			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">审核</h4>
					</div>
					<div class="modal-body">
						<div class="row center-block">
							<div ng-show="employee.contract_status==0" >
 								<input type="radio" ng-model="employee.contract_status"   ng-checked="employee.contract_status==0"> 签约
							</div>
							<div ng-show="employee.contract_status==1" >
								<input type="radio" ng-model="employee.contract_status"   ng-checked="employee.contract_status==1"> 解约
							</div>
							<div ng-show="employee.contract_status==2" >
								<input type="radio" ng-model="employee.contract_status"  ng-checked="employee.contract_status==2"> 重置
							</div>
							</div>
 						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" ng-click="contract(employee)" data-dismiss="modal" class="btn btn-primary">提交</button>
					</div>
				</div>
			</div>
 	</div>
	<!-- 模态框（Modal） -->
	<div class="modal fade" id="myModal2" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel2" aria-hidden="true">
 			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">信息</h4>
					</div>
					<div class="modal-body">
						<div class="row">
							<div class="col-md-2">
   								 <label class="control-label">姓名</label>
							</div>
							<div class="col-md-4">
   								 <label class="control-label">{{employee.true_name}}</label>
							</div>
							<div class="col-md-2">
								<label class="control-label">工号</label>				
							</div>
							<div class="col-md-4">
								<label class="control-label">{{employee.user_id}}</label>				
							</div>
						</div>
						<div class="row">
							<div class="col-md-2">
								<label class="control-label">手机</label>				
							</div>
							<div class="col-md-4">
								<label class="control-label">{{employee.mobile}}</label>				
							</div>
							<div class="col-md-2">
   								 <label class="control-label">身份证</label>
							</div>
							<div class="col-md-4">
   								 <label class="control-label">{{employee.id_card}}</label>
							</div>
						</div>
						<div class="row">
							<div class="col-md-2">
								<label class="control-label">职位</label>				
							</div>
							<div class="col-md-4">
								<label class="control-label">物流员</label>				
							</div>
							<div class="col-md-2">
   								 <label class="control-label">状态</label>
							</div>
							<div class="col-md-4">
   								 <label class="control-label" ng-show="employee.contract_status==0">未签约</label>
   								 <label class="control-label" ng-show="employee.contract_status==1">已签约</label>
   								 <label class="control-label" ng-show="employee.contract_status==2">已解约</label>
							</div>
						</div>
						<div class="row">
							<div class="col-md-2">
								<label class="control-label">申请时间</label>				
							</div>
							<div class="col-md-4">
								<label class="control-label">{{employee.create_time}}</label>				
							</div>
							<div class="col-md-2">
   								 <label class="control-label" ng-show="employee.contract_status==1">签约时间</label>
   								 <label class="control-label" ng-show="employee.contract_status==2">解约时间</label>
							</div>
							<div class="col-md-4">
   								 <label class="control-label" ng-show="employee.contract_status==1">{{employee.contract_time}}</label>
   								 <label class="control-label" ng-show="employee.contract_status==2">{{employee.discontract_time}}</label>
 							</div>
						</div>
						<div class="row">
							<img class="img-rounded" style="max-width: 290px;" src="${imgPath}/{{employee.idcard_pic1}}">
							<img class="img-rounded" style="max-width: 290px;" src="${imgPath}/{{employee.idcard_pic2}}">
						</div>


					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" ng-click="contract()" data-dismiss="modal" class="btn btn-primary">暂存</button>
					</div>
				</div>
			</div>
 	</div>
	<script src="${imgPath}/plugins/bootstrap-3.3.5-dist/js/ie10-viewport-bug-workaround.js"></script>
	<script src="${imgPath}/js/employeemanage.js"></script>
</body>
</html>